﻿using System;
using System.Collections.Generic;
using System.Text;

namespace game2
{
    public class Computer
    {
        private Core my_core;
        public elements MapBrush = elements.o;

        public void SetElementOnMap()
        {
            int x, y;
            bool flag = true;
            Random rnd = new Random((int)DateTime.Now.Ticks);
            while (flag)
            {
                x = rnd.Next(0, 3);
                y = rnd.Next(0, 3);
                
                if (my_core.GetMap(x, y) != elements.e)
                {
                    continue;
                }
                //else
                {
                    my_core.SetMap(x, y, MapBrush);
                    flag = false;
                }
            }
        }
        public Computer(Core in_core){my_core = in_core;}
        ~Computer() { }
    }
}
